<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../_judge.php");
	include("../../function/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?= $adminweb_titles ?></title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script>if (top.location != parent.location||self.location==top.location){top.location.replace('../login/admin.php')}</script>
<script language="javascript" src="../script/jquery-1.7.2.min.js"></script>
<script language="javascript" src="../script/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" href="../../SunbeamEditor/themes/default/default.css" />
<script charset="utf-8" src="../../SunbeamEditor/kindeditor.js"></script>
<script charset="utf-8" src="../../SunbeamEditor/lang/zh_CN.js"></script>
<script language="javascript">
	KindEditor.ready(function(K) {
		var editor = K.create('textarea[name="trailfoot_map"]', {
			cssPath : '../../SunbeamEditor/plugins/code/prettify.css',
			uploadJson : '../../SunbeamEditor/php/upload_json.php',
			fileManagerJson : '../../SunbeamEditor/php/file_manager_json.php',
			allowFileManager : false,
			afterBlur: function(){this.sync();}
		});
		var editor1 = K.create('textarea[name="trailfoot_about"]', {
			cssPath : '../../SunbeamEditor/plugins/code/prettify.css',
			uploadJson : '../../SunbeamEditor/php/upload_json.php',
			fileManagerJson : '../../SunbeamEditor/php/file_manager_json.php',
			allowFileManager : false,
			afterBlur: function(){this.sync();}
		});
		var editor2 = K.create('textarea[name="trailfoot_footline"]', {
			cssPath : '../../SunbeamEditor/plugins/code/prettify.css',
			uploadJson : '../../SunbeamEditor/php/upload_json.php',
			fileManagerJson : '../../SunbeamEditor/php/file_manager_json.php',
			allowFileManager : false,
			afterBlur: function(){this.sync();}
		});
		var editor3 = K.create('textarea[name="trailfoot_foot"]', {
			cssPath : '../../SunbeamEditor/plugins/code/prettify.css',
			uploadJson : '../../SunbeamEditor/php/upload_json.php',
			fileManagerJson : '../../SunbeamEditor/php/file_manager_json.php',
			allowFileManager : false,
			afterBlur: function(){this.sync();}
		});
		
		
		

		/////   点击上传图片
		var editor = K.editor({
			allowFileManager : false
		});
		K('#image1').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#trailfoot_pic').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#trailfoot_pic').val(url);
						editor.hideDialog();
					}
				});
			});
		});
		K('#image2').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#trailfoot_pic2').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#trailfoot_pic2').val(url);
						editor.hideDialog();
					}
				});
			});
		});
		K('#image3').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#trailfoot_pic3').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#trailfoot_pic3').val(url);
						editor.hideDialog();
					}
				});
			});
		});
		K('#image4').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#trailfoot_pic4').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#trailfoot_pic4').val(url);
						editor.hideDialog();
					}
				});
			});
		});
		
		
});

$(document).ready(function(){
	
	$("#myform").submit(function(){
		var trailfoot_title = $("#trailfoot_title").val();

		if (trailfoot_title.replace(/\ /g,"").length<1){
			alert("信息标题不能为空！");
			$("#trailfoot_title").focus();
			return false;
		}
	});
});
</script>


</head>

<body>
<table width="97%" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td><strong>后台管理</strong>&nbsp;-&nbsp;<span class="hong"><strong>目的地足迹添加</strong></span></td>
  </tr>

</table>
<form id="myform" name="myform" method="post" action="newsaddsave.php?action=add">
<table width="97%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#333333">
    <tr>
      <td width="80" align="right" bgcolor="#EFEFEF">信息标题：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_title" type="text" id="trailfoot_title" size="50" />
      &nbsp;<span class="hong">*</span></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">出发时间：</td>
      <td width="327" bgcolor="#EFEFEF"><input name="trailfoot_startime" type="text" id="trailfoot_startime" size="38" /></td>
      <td width="112" align="right" bgcolor="#EFEFEF">历时：</td>
      <td width="742" bgcolor="#EFEFEF"><input name="trailfoot_duration" type="text" id="trailfoot_duration" size="38" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">线路：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_line" type="text" id="trailfoot_line" size="38" /></td>
      <td align="right" bgcolor="#EFEFEF">全程：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_allline" type="text" id="trailfoot_allline" size="38" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">强度等级：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_power" type="text" id="trailfoot_power" size="38" /></td>
      <td align="right" bgcolor="#EFEFEF">累计上升：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_rise" type="text" id="trailfoot_rise" size="38" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">累计下降：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_drop" type="text" id="trailfoot_drop" size="38" /></td>
      <td align="right" bgcolor="#EFEFEF">最低海拔：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_baltitude" type="text" id="trailfoot_baltitude" size="38" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">最高海拔：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_taltitude" type="text" id="trailfoot_taltitude" size="38" /></td>
      <td align="right" bgcolor="#EFEFEF">最高时速：</td>
      <td bgcolor="#EFEFEF"><input name="trailfoot_speed" type="text" id="trailfoot_speed" size="38" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">概述：</td>
      <td colspan="3" bgcolor="#EFEFEF"><textarea name="trailfoot_text" cols="70" rows="4" id="trailfoot_text">
      </textarea></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">作者：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_writer" type="text" id="trailfoot_writer" size="25" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">上传图片：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_pic" type="text" id="trailfoot_pic" value="<?=$trailfoot_pic?>" size="25" />
        <input name="button" type="button" id="image1" value="选择图片" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">地图线路：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_pic2" type="text" id="trailfoot_pic2" value="<?=$trailfoot_pic2?>" size="25" />
        <input name="button" type="button" id="image2" value="选择图片" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">地图线路：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_pic3" type="text" id="trailfoot_pic3" value="<?=$trailfoot_pic3?>" size="25" />
        <input name="button" type="button" id="image3" value="选择图片" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">地图线路：</td>
      <td colspan="3" bgcolor="#EFEFEF"><input name="trailfoot_pic4" type="text" id="trailfoot_pic4" value="<?=$trailfoot_pic4?>" size="25" />
        <input name="button" type="button" id="image4" value="选择图片" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">目的地地图：</td>
      <td colspan="3" bgcolor="#EFEFEF"><textarea name="trailfoot_map" style="width:680px;height:350px;visibility:hidden;"></textarea></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">目的地简介：</td>
      <td colspan="3" bgcolor="#EFEFEF"><textarea name="trailfoot_about" style="width:680px;height:350px;visibility:hidden;"></textarea></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">步道线路：</td>
      <td colspan="3" bgcolor="#EFEFEF"><textarea name="trailfoot_footline" style="width:680px;height:350px;visibility:hidden;"></textarea></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#EFEFEF">足迹：</td>
      <td colspan="3" bgcolor="#EFEFEF"><textarea name="trailfoot_foot" style="width:680px;height:350px;visibility:hidden;"></textarea></td>
    </tr>
    <tr>
      <td bgcolor="#EFEFEF">&nbsp;</td>
      <td colspan="3" bgcolor="#EFEFEF"><input type="submit" name="Submit" value="提交保存" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" name="Submit2" value="重置取消" /></td>
    </tr>
</table>
</form>
</body>
</html>
